$(document).ready(function() {
	$("#loginForm").validate( {
		rules : {
			username : {
				required : true,
				minlength : 4
			},
			password : {
				required : true,
				minlength : 6
			},
			validateCode : {
				required : true,
				rangelength:[4,4]
			}
		},
		messages : {
			validateCode : {
				required : "请输入验证码",
				rangelength : "验证码是4位的"
			},
			username : {
				required : "请输入用户名",
				minlength : "用户名长度要大于4位"
			},
			password : {
				required : "请输入密码",
				minlength : "密码长度要大于6位"
			}
		}
	});
});